﻿namespace JxcLite.Repositories;

class FinanceRepository
{
    internal static Task<string> GetMaxAccountNoAsync(Database db, string prefix)
    {
        var sql = $"select max(AccountNo) from JxAccountHead where CompNo=@CompNo and AccountNo like '{prefix}%'";
        return db.ScalarAsync<string>(sql, new { db.User.CompNo });
    }
}